﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Apps/MasterPage.master" AutoEventWireup="false"
    CodeFile="report_stp_department.aspx.vb" Inherits="Apps_report_stp_department" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="Server">
    <table width="50%" border="1" align="center" cellpadding="2" cellspacing="2" bordercolor="#999999">
        <tr align="center" bgcolor="#99FFFF">
            <td colspan="2" bgcolor="#FFFFFF" class="th_data">
                ข้อมูลหน่วยงาน
            </td>
        </tr>
        <tr align="left">
            <td width="47%" bordercolor="#CCCCCC" class="td_box">
                ระดับหน่วยงาน :
            </td>
            <td width="53%" bordercolor="#CCCCCC" class="td_box">
                <asp:DropDownList ID="ddlDepartmentMaster" runat="server" AutoPostBack="True" DataSourceID="ddlDepartmentMasterSrc"
                    DataTextField="master_department_name" DataValueField="master_department_code"
                    AppendDataBoundItems="True">
                    <asp:ListItem Text="ระดับหน่วยงาน" Value="0"></asp:ListItem>
                </asp:DropDownList>
                <asp:SqlDataSource ID="ddlDepartmentMasterSrc" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
                    SelectCommand=" 
                    select  master_department_name ,
                            master_department_code

                    from    master_department
                    where	master_department_status = 1
                    order	by master_department_level">
                </asp:SqlDataSource>
            </td>
        </tr>
        <%--<tr align="left">
            <td width="47%" bordercolor="#CCCCCC" class="td_box">
                หน่วยงาน :
            </td>
            <td width="53%" bordercolor="#CCCCCC" class="td_box">
                <asp:ListBox ID="lstStpDepartment" runat="server" 
                    DataSourceID="ddlStpDepartmentSrc" DataTextField="department_name" 
                    DataValueField="department_code" SelectionMode="Multiple" 
                    AppendDataBoundItems="True">
                    <asp:ListItem Value="0" Text="ทั้งหมด"></asp:ListItem>
                </asp:ListBox>
                <asp:ObjectDataSource ID="ddlStpDepartmentSrc" runat="server" SelectMethod="GetStpDepartment"
                    TypeName="StpDepartment">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddlDepartmentMaster" 
                            Name="masterDepartmentCode" PropertyName="SelectedValue" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </td>
        </tr>--%>
        <tr align="left">
            <td width="47%" bordercolor="#CCCCCC" class="td_box">
                หน่วยงาน :
            </td>
            <td width="53%" bordercolor="#CCCCCC" class="td_box">
                <asp:ListBox ID="lstStpDepartment" runat="server" 
                    DataSourceID="ddlStpDepartmentSrc" DataTextField="department_name" 
                    DataValueField="department_code" SelectionMode="Multiple" 
                    AppendDataBoundItems="True">
                    <asp:ListItem Value="0" Text="ทั้งหมด"></asp:ListItem>
                </asp:ListBox>
                <asp:ObjectDataSource ID="ddlStpDepartmentSrc" runat="server" SelectMethod="GetStpDepartmentByPrivilege1"
                    TypeName="CodeMatrix.Business.GenericData">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="ddlDepartmentMaster"
                            Name="master_dept_level" PropertyName="SelectedValue" Type="Int32" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </td>
        </tr>
        <tr align="center">
            <td colspan="2" bordercolor="#CCCCCC" class="td_data_end">
                <asp:Button ID='btnFilter' Text='แสดงรายงาน' runat='server' />
                <asp:Button ID='btnMainMenu' Text='<%$ Resources:Resource,BTN_MAINMENU %>' runat='server' PostBackUrl="~/Apps/ViewSystem.aspx?Edit=2" />
            </td>
        </tr>
    </table>
</asp:Content>
